<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/lista.xhtml">
    <ui:param name="pPageTitle" value="${label['unidade.titulo']}"/>
    <ui:param name="pAction" value="cadastrarUnidade"/>
    <ui:param name="pManagedBean" value="#{unidadeView}"/>
    <ui:param name="pTarget" value="#{unidadeView.unidade}"/>
    <ui:param name="pListaRecords" value="#{unidadeView.unidades}"/>
    <ui:param name="pMsgConfirmationObject" value="unidade"/>
    <ui:param name="pMsgConfirmationDescription" value="#{unidadeView.unidade.nomUnid}"/>

    <ui:define name="dataTable">
        <p:column sortBy="#{obj.nomUnid}" headerText="${label['unidade.descricao']}" 
                  filterBy="#{obj.nomUnid}" filterMatchMode="contains">
            <h:outputText value="#{obj.nomUnid}"/>
        </p:column>        
        <p:column sortBy="#{obj.codUni}" headerText="${label['unidade.codigo']}" 
                  filterBy="#{obj.codUni}" filterMatchMode="contains">
            <h:outputText value="#{obj.codUni}"/>
        </p:column>
    </ui:define>
</ui:composition>
